import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-04-10
 * Time: 20:22
 */
public class Test {
    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addLast(30);
        myLinkedList.addLast(30);
        myLinkedList.addLast(30);
        myLinkedList.display();
//        myLinkedList.removeAll(30);
//        myLinkedList.display();
        List<Integer> linkedList = new LinkedList<>();
        ListIterator<Integer> lit = linkedList.listIterator();
        while(lit.hasNext()) {
            System.out.print(lit.next() + " ");
        }
        ListIterator<Integer> lit2 = linkedList.listIterator(linkedList.size());
        while(lit.hasPrevious()) {
            System.out.print(lit.previous() + " ");
        }
    }
}
